function igpop_r(a)
{
    try
    {
        throw a;
    }
    catch(b)
    {
    }
}
var igpop_e = new igpop_J;
function igpop_J()
{
    this.a = []
}
function igpop_I(a)
{
    a = a || window.event;
    if (a.type == "keydown" && igpop_t(a) != 27)return false;
    if (igpop_e.a.length == 0)return false;
    for (var b = igpop_e.a.length - 1; b >= 0; --b)
    {
        var e = igpop_e.a[b];
        igpop_H(e);
        if (e.deactivate(a))
        {
            igpop_e.a.splice(b, 1)
        }
    }
    return true
}
function igpop_H(a)
{
    igpop_f(a.deactivate, Function, "popup missing deactivate function")
}
var igpop_d,igpop_P,igpop_Q,igpop_R,igpop_u,igpop_x,igpop_v,igpop_S,igpop_w;
(function()
{
    var a = navigator.userAgent.toLowerCase();
    igpop_d = a.indexOf("msie") != -1;
    igpop_P = a.indexOf("msie 5") != -1 && document.all;
    igpop_Q = a.indexOf("msie 6") != -1 && document.all;
    igpop_R = a.indexOf("msie 7") != -1 && document.all;
    igpop_u = a.indexOf("konqueror") != -1;
    igpop_x = a.indexOf("safari") != -1 || igpop_u;
    igpop_v = !igpop_d && !igpop_x && a.indexOf("mozilla") != -1;
    igpop_S = a.indexOf("win") != -1;
    igpop_w = !(!window.opera)
})();
function igpop_t(a)
{
    var b;
    if (a.type === "keypress")
    {
        if (igpop_d)
        {
            b = a.keyCode
        }
        else if (igpop_v)
        {
            b = a.which;
            if (b)
            {
            }
            else
            {
                b = a.keyCode
            }
        }
        else
        {
            return a.keyCode || a.which
        }
    }
    else
    {
        if (a.keyCode)
        {
            b = a.keyCode
        }
        else if (a.which)
        {
            b = a.which
        }
    }
    return b
}
function igpop_N(a)
{
    return document.getElementById(a)
}
function igpop_O(a)
{
    return document.all[a]
}
var igpop_M = document.getElementById ? igpop_N : igpop_O;
function igpop_a(a)
{
    return typeof a != "undefined"
}
function igpop_s(a)
{
    if (!igpop_a(a))a = "Assertion failed";
    if (igpop_a(igpop_r))igpop_r(a + "\n")
}
function igpop_f(a, b, e)
{
    if (typeof a == b)return;
    if (a || a == "")
    {
        try
        {
            if (b == igpop_z[typeof a] ||
                a instanceof b)
            {
                return
            }
        }
        catch(c)
        {
        }
    }
    if (!igpop_a(e))
    {
        if (typeof b == "function")
        {
            var d = b.toString().match(/^\s*function\s+([^\s\{]+)/);
            if (d)b = d[1]
        }
        e = "AssertType failed: <" + a + "> not typeof " + b
    }
    igpop_s(e)
}
function igpop_y(a, b)
{
    if (!igpop_a(b))b = "Assertion failed";
    igpop_s(b)
}
var igpop_z = {string:String,number:Number,"boolean":Boolean};
function igpop_G(a)
{
    if (a.innerWidth)
    {
        return a.innerWidth
    }
    else if (document.documentElement && document.documentElement.clientWidth)
    {
        return document.documentElement.clientWidth
    }
    else if (document.body)
    {
        return document.body.clientWidth
    }
    return 0
}
function igpop_F(a)
{
    if (a.innerHeight)
    {
        return a.innerHeight
    }
    else if (document.documentElement && document.documentElement.clientHeight)
    {
        return document.documentElement.clientHeight
    }
    else if (document.body)
    {
        return document.body.clientHeight
    }
    return 0
}
function igpop_K(a, b, e)
{
    if (igpop_a(b.selectionEnd) && igpop_a(b.selectionStart))
    {
        b.selectionStart = e;
        b.selectionEnd = e
    }
    else if (a.document.selection && b.createTextRange)
    {
        var c = b.createTextRange();
        c.collapse(true);
        c.move("character", e);
        c.select()
    }
}
function igpop_L(a)
{
    igpop_y(a);
    var b = typeof a === "string" ? igpop_M(a) : a;
    if (b)
    {
        try
        {
            b.focus();
            if (b.tagName == "INPUT" && (b.type == "text" || b.type == "password"))
            {
                igpop_K(window, b, 0)
            }
        }
        catch(e)
        {
        }
    }
}
Function.prototype.bind = function(a)
{
    if (typeof this != "function")
    {
        throw new Error("Bind must be called as a method of a function object.");
    }
    var b = this,e = Array.prototype.splice.call(arguments, 1, arguments.length);
    return function()
    {
        var c = e.concat();
        for (var d = 0; d < arguments.length; d++)
        {
            c.push(arguments[d])
        }
        return b.apply(a, c)
    }
};
var igpop_k,igpop_l;
(function()
{
    var a =
    {},b = 0;
    function e(f)
    {
        if (!f.b)
        {
            f.b = ++b
        }
        return f.b
    }
    function c(f, g, k, h)
    {
        var i = e(f),j = e(k);
        h = !(!h);
        var l = i + "_" + g + "_" + j + "_" + h;
        return l
    }
    igpop_k = function(f, g, k, h)
    {
        var i = c(f, g, k, h);
        if (i in a)
        {
            return i
        }
        var j = d.bind(null, i);
        a[i] = {listener:k,proxy:j};
        if (f.addEventListener)
        {
            f.addEventListener(g, j, h)
        }
        else if (f.attachEvent)
        {
            f.attachEvent("on" + g, j)
        }
        else
        {
            throw new Error("Node {" + f + "} does not support event listeners.");
        }
        return i
    };
    igpop_l = function(f, g, k, h)
    {
        var i = c(f, g, k, h);
        if (!(i in a))
        {
            return false
        }
        var j = a[i].proxy;
        if (f.removeEventListener)
        {
            f.removeEventListener(g, j, h)
        }
        else if (f.detachEvent)
        {
            f.detachEvent("on" + g, j)
        }
        delete a[i];
        return true
    };
    function d(f)
    {
        var g = Array.prototype.splice.call(arguments, 1, arguments.length);
        return a[f].listener.apply(null, g)
    }
})();
function igpop_A(a, b)
{
    if ("opacity"in a.style)
    {
        a.style.opacity = b ? 0.5 : 1
    }
    else if ("MozOpacity"in a.style)
    {
        a.style.MozOpacity = b ? 0.5 : 1
    }
    else if ("filter"in a.style)
    {
        a.style.filter = b ? "alpha(opacity=50)" : "alpha(opacity=100)"
    }
}
var igpop_c = {};
function igpop_j(a)
{
    return"<button>" +
          a + "</button>"
}
function igpop_q(a, b, e)
{
    igpop_f(a, String);
    if (b)
    {
        igpop_f(b, Function)
    }
    if (e)
    {
        igpop_f(e, Function)
    }
    setTimeout(function()
    {
        igpop_B();
        var c = document.getElementById(igpop_g);
        if (!c)
        {
            c = document.createElement("DIV");
            c.id = igpop_g;
            c.style.width = (c.style.height = "100%");
            c.style.left = (c.style.right = (c.style.top = (c.style.bottom = "0px")));
            c.style.zIndex = 3000;
            c.style.background = "#fff";
            igpop_A(c, true);
            c.style.position = "absolute";
            c.onmousedown = (c.onmouseup = (c.onmousemove = (c.onkeydown = (c.onkeyup = (c.onkeypress =
                                                                                         (c.onclick = (c.ondblclick = igpop_C)))))));
            c.style.display = "none";
            document.body.appendChild(c)
        }
        var d = document.getElementById(igpop_h);
        if (!d)
        {
            d = document.createElement("DIV");
            d.id = igpop_h;
            d.onmousedown = (d.onmouseup = (d.onmousemove = (d.onkeydown = (d.onkeyup = (d.onclick = (d.ondblclick = igpop_p))))));
            d.onkeypress = igpop_D;
            d.style.position = "absolute";
            d.style.display = "none";
            d.style.zIndex = 3001;
            document.body.appendChild(d)
        }
        d.innerHTML = '<table class="dialog" cellspacing="0" cellpadding="0"><tr><td><div class="top1">&nbsp;</div><div class="top2">&nbsp;</div>' +
                      a + '<div class="bot2">&nbsp;</div><div class=bot1>&nbsp;</div></td></tr></table>';
        igpop_k(window, "resize", igpop_);
        igpop_k(window, "scroll", igpop_);
        d.style.visibility = "hidden";
        d.style.display = "block";
        igpop_();
        igpop_b = b;
        if (igpop_d)
        {
            igpop_c = {};
            var f = [window];
            for (var g = 0; g < window.frames.length; ++g)
            {
                f.push(window.frames[g])
            }
            for (var k = 0; k < f.length; ++k)
            {
                try
                {
                    var h = f[k].document
                }
                catch(i)
                {
                    continue
                }
                for (var g = 0; g < h.forms.length; ++g)
                {
                    var j = h.forms[g];
                    for (var l = 0; l < j.length; ++l)
                    {
                        var n = j[l];
                        if (n.tagName == "SELECT")
                        {
                            var m =
                                    n.style.visibility;
                            if (!m)m = "";
                            if (!(m in igpop_c))
                            {
                                igpop_c[m] = []
                            }
                            var p = igpop_c[m];
                            n.style.visibility = "hidden";
                            p.push(n)
                        }
                    }
                }
            }
        }
        c.style.display = "block";
        d.style.visibility = "visible";
        var o = d.getElementsByTagName("button");
        if (o.length > 0)
        {
            igpop_L(o[0])
        }
        if (e)setTimeout(e, 0)
    }, 0)
}
function igpop_n(a)
{
    igpop_o();
    if (igpop_b)
    {
        var b = igpop_b,e = b(a);
        if (e)
        {
            if ("string" == typeof e)
            {
                var c = document.getElementById(igpop_i) || document.getElementById("dialogbody");
                c.innerHTML = e
            }
            return
        }
        igpop_b = null
    }
    igpop_m()
}
function igpop_B()
{
    igpop_o();
    igpop_m()
}
function igpop_o()
{
    if (igpop_d)
    {
        for (var a in igpop_c)
        {
            var b = igpop_c[a];
            for (var e = 0; e < b.length; ++e)
            {
                var c = b[e];
                try
                {
                    c.style.visibility = a
                }
                catch(d)
                {
                }
            }
        }
    }
    var f = document.getElementById(igpop_g),g = document.getElementById(igpop_h);
    if (f)
    {
        f.style.display = "none"
    }
    if (g)
    {
        g.style.display = "none";
        g.innerHTML = ""
    }
}
function igpop_m()
{
    igpop_l(window, "resize", igpop_);
    igpop_l(window, "scroll", igpop_);
    var a = igpop_b;
    if (a)
    {
        igpop_b = null;
        a(undefined)
    }
}
function igpop_E(a, b, e, c)
{
    var d = ['<div class="border titlebar">',b,
            "</div>"];
    d.push('<div class="border body" id="', igpop_i, '">');
    d.push(e);
    d.push("<center><table class=buttontable cellspacing=0 cols=");
    d.push(c.length, "><tr>");
    for (var f = 0; f < c.length; ++f)
    {
        d.push('<td align=center><span onclick="_CloseDialog(', f, ')">', c[f], "</span>")
    }
    d.push("</table></center></div>");
    igpop_q('<div class="outerborder">' + d.join("") + "</div>", a)
}
function _Confirm(a, b, e, c)
{
    if (!c)
    {
        c = [igpop_j("Yes"),igpop_j("No")]
    }
    igpop_E(a, b, e, c)
}
function _ConfirmURL(a, b, e)
{
    var c = ['<div class="border titlebar">'];
    c.push('<div class="popup_title">', a, "</div>");
    c.push('<div class="popup_title_buttons">');
    c.push('<a class="delbox" onclick="_CloseDialog(_DI_button_type.Close);">', "</a></div></div>");
    c.push('<div class="border body url" id="', igpop_i, '">');
    c.push('<iframe id="popup_iframe" width="', e, '" height="0px"', ' src="', b, '" onload="_ResizeIframeHeight();" /></div>');
    igpop_q(c.join(""), null)
}
function _ResizeIframeHeight()
{
    var a = _gel("popup_iframe").contentWindow.document.body.scrollHeight;
    _gel("popup_iframe").height =
    a + "px";
    igpop_()
}
function igpop_()
{
    var a = igpop_d || igpop_w ? igpop_G(window) : document.width,b = igpop_F(window),e = document.getElementById(igpop_g);
    if (e)
    {
        e.style.width = Math.max(document.body.clientWidth, a) + "px";
        e.style.height = Math.max(document.body.clientHeight, b) + "px"
    }
    var c = document.getElementById(igpop_h);
    if (c)
    {
        var d = (a - c.offsetWidth) / 2 + document.body.scrollLeft,f = (b - c.offsetHeight) / 2 + document.body.scrollTop;
        c.style.left = d + "px";
        c.style.top = f + "px"
    }
}
function igpop_C(a)
{
    a = a || window.event;
    a.cancelBubble = true;
    if ("stopPropagation"in a)
    {
        a.stopPropagation()
    }
    return false
}
function igpop_D(a)
{
    if (!a)
    {
        a = window.event
    }
    if (!(a.altKey || a.ctrlKey || a.metaKey) && igpop_t(a) == 27)
    {
        if (!(!igpop_e.a.length))
        {
            igpop_I(a)
        }
        else
        {
            igpop_n(-1)
        }
    }
    return igpop_p(a)
}
function igpop_p(a)
{
    a = a || window.event;
    a.cancelBubble = true;
    if ("stopPropagation"in a)
    {
        a.stopPropagation()
    }
    return true
}
function _MakeDialogButton(a)
{
    return igpop_j(a)
}
function _CloseDialog(a)
{
    return igpop_n(a)
}
var igpop_g = "dialogcover",igpop_h = "dialogwindow",igpop_i = "dialogcontent",
        igpop_b,_DI_button_type = {Close:2,OK:0,Cancel:1};
